<template>
  <div style="position: relative">
    <el-button @click="addimg" class="addimg">添加图片</el-button>
    <CustomScroll class="imgbox"
      ><div>
        <img v-for="(item, index) in img" :key="index" :src="item" /></div
    ></CustomScroll>
    <p>CustomScroll</p>
    <p>CustomScroll</p>
    <p>CustomScroll</p>
    <p>CustomScroll</p>
    <p>CustomScroll</p>
    <p>CustomScroll</p>
    <p>CustomScroll</p>
    <p>CustomScroll</p>
    <p>CustomScroll</p>
    <p>CustomScroll</p>
    <p>CustomScroll</p>
  </div>
</template>
<script>
import CustomScroll from "../../components/CustomScroll.vue";
export default {
  setup() {},
  components: { CustomScroll },
  data() {
    return {
      img: [],
    };
  },
  methods: {
    addimg() {
      this.img.push("./images/865030.jpg");
      this.img.push("./images/1113071.jpg");
    },
  },
};
</script>
<style scoped>
.addimg {
}
.imgbox {
  height: calc(var(--content-height) - 50px);
  width: var(--content-width);
}
.imgbox > div {
  height: max-content;
  width: max-content;
}
</style>
